package com.kedi.healthcenter.service.impl;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.kedi.healthcenter.read.dao.mapper.HealthFoodMapper;
import com.kedi.healthcenter.service.HealthFoodService;

/**
 * 
 * @Description: 长者健康模块
 * @author: dw
 * @date: 2019 2019年7月27日 下午11:10:45
 */
@Service
public class HealthFoodServiceImpl implements HealthFoodService {
	@Autowired
	HealthFoodMapper healthFoodMapper;

	final static Logger logger = LoggerFactory.getLogger(HealthFoodServiceImpl.class);

	/**
	 * 返回长者健康对应的食物
	 */
	@Override
	public List<Map<String, Object>> oldFoods(int puserid,int page,int limit) {
		try {
			List<Map<String, Object>> a = healthFoodMapper.oldFoods(puserid, page, limit);
			return a;
		} catch (Exception e) {
			e.printStackTrace();
			logger.error("查询失败");
			return null;
		}
	}

}
